package com.ruoyi.shaketicket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shaketicket.mapper.ShaketicketCouponMapper;
import com.ruoyi.shaketicket.domain.ShaketicketCoupon;
import com.ruoyi.shaketicket.service.IShaketicketCouponService;
import com.ruoyi.common.support.Convert;

/**
 * 摇一摇卡券 服务层实现
 * 
 * @author lzy
 * @date 2019-03-01
 */
@Service
public class ShaketicketCouponServiceImpl implements IShaketicketCouponService 
{
	@Autowired
	private ShaketicketCouponMapper shaketicketCouponMapper;

	/**
     * 查询摇一摇卡券信息
     * 
     * @param id 摇一摇卡券ID
     * @return 摇一摇卡券信息
     */
    @Override
	public ShaketicketCoupon selectShaketicketCouponById(String id)
	{
	    return shaketicketCouponMapper.selectShaketicketCouponById(id);
	}
	
	/**
     * 查询摇一摇卡券列表
     * 
     * @param shaketicketCoupon 摇一摇卡券信息
     * @return 摇一摇卡券集合
     */
	@Override
	public List<ShaketicketCoupon> selectShaketicketCouponList(ShaketicketCoupon shaketicketCoupon)
	{
	    return shaketicketCouponMapper.selectShaketicketCouponList(shaketicketCoupon);
	}
	
    /**
     * 新增摇一摇卡券
     * 
     * @param shaketicketCoupon 摇一摇卡券信息
     * @return 结果
     */
	@Override
	public int insertShaketicketCoupon(ShaketicketCoupon shaketicketCoupon)
	{
	    return shaketicketCouponMapper.insertShaketicketCoupon(shaketicketCoupon);
	}
	
	/**
     * 修改摇一摇卡券
     * 
     * @param shaketicketCoupon 摇一摇卡券信息
     * @return 结果
     */
	@Override
	public int updateShaketicketCoupon(ShaketicketCoupon shaketicketCoupon)
	{
	    return shaketicketCouponMapper.updateShaketicketCoupon(shaketicketCoupon);
	}

	/**
     * 删除摇一摇卡券对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteShaketicketCouponByIds(String ids)
	{
		return shaketicketCouponMapper.deleteShaketicketCouponByIds(Convert.toStrArray(ids));
	}
	
}
